<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>DouPHP 管理中心 - 自定义导航栏 </title>
    <meta name="Copyright" content="Douco Design." />
    <link href="<?php echo base_url()?>common/css/public.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/global.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.tab.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/layer/layer.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.Msg.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.form.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.validate.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.metadata.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.validate.messages_cn.js"></script>
    <script type="text/javascript" src="<?php echo base_url()?>common/js/validate.js"></script>
    <link rel="stylesheet" href="<?php echo base_url()?>common/ueditor/themes/default/css/ueditor.min.css" />
    <link rel="stylesheet" href="<?php echo base_url()?>common/kindeditor/themes/default/default.css" />
    <script src="<?php echo base_url()?>common/kindeditor/kindeditor.js"></script>
    <script src="<?php echo base_url()?>common/kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript">
        function GoBack() {
            history.back();
        }
        function alert_msg()
        {
            layer.msg('导航级栏目未添加，请联系开发人员', { icon: 5, time: 3000 })
        }
        
    </script>
    <script type="text/javascript">
        function manage_menu() {
            url = "<?php echo site_url('admin/menu/manage')?>";
            layer.open({
                type: 2,
                title: '栏目管理',
                maxmin: true,
                shadeClose: false, //开启点击遮罩关闭层
                area: ['1000px', '800px'],
                offset: ['100px', ''],
                content: url,
                cancel: function () {
                    window.location.href = window.location.pathname;
                }
            });
        }
    </script>
</head>
<?php
 //p($this->first_top_level_menu);
$fisrt_top_menu=$this->first_top_level_menu;
$contents_url=$user_authority==1?"javascript:manage_menu()":"javascript:alert_msg()";
if(!empty($fisrt_top_menu))
    {
        if($fisrt_top_menu->child>0)
        {
            $contents_url=site_url("admin/menu/menulist/".$fisrt_top_menu->menuid);
        }
        else
        {
             $contents_url=site_url("admin/".$fisrt_top_menu->menu_control."/".$fisrt_top_menu->menu_action."/".$fisrt_top_menu->menuid);
        }
    }
?>
<body>
    <div id="dcWrap">
        <div id="dcHead">
            <div id="head">
                <div class="logo"><a href="/"><img src="<?php echo base_url()?>common/images/dclogo.gif" alt="logo"></a></div>
                <div class="nav">
                    <ul>
                        <li>
                            <a href="<?php echo site_url('admin/sys/config')?>" class="topAdd">管理首页</a>
                        </li>
                        <li><a href="<?php echo site_url('admin/shop/shopdetail')?>">商城管理</a></li>
                        <li><a href="<?php echo $contents_url?>">内容管理</a></li>
                        <li><a href="<?php echo site_url('admin/menu/index')?>">栏目管理</a></li>
                        <li><a href="<?php echo site_url('admin/user/userlist')?>">用户管理</a></li>
                        <li><a href="index.php?rec=clear_cache">清除缓存</a></li>
                        <li><a href="http://help.douco.com" target="_blank">帮助</a></li>
                        <li class="noRight"><a href="/" target="_blank">查看首页</a></li>
                    </ul>
                    <ul class="navRight">
                        <li class="M noLeft">
                            <a href="JavaScript:void(0);">您好，<?php echo $get_current_user_name?></a>
                        </li>
                        <li class="noRight"><a href="<?php echo site_url('admin/login/do_exit')?>">退出</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <?php
            if($left==1){
                 $this->load->view('admin/leftnav/confignav.html');
                }
             else if($left==2){
                 $this->load->view('admin/leftnav/goods.html');
                }
            else if($left==3){
                 $this->load->view('admin/leftnav/usernav.html');
                }
            else if($left==4)
                {
                $data['one']='menu';
                 $this->load->view('admin/leftnav/menunav.html',$data);
                }
        ?>
